package com.emergency.examine.domain;

import com.emergency.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;

//考生总成绩
@Entity
@Table(name = "ex_exam_score")
public class ExamScore extends BaseEntity {

    @JsonIgnore
    @OneToOne(targetEntity = ExamStaff.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "staff_id", referencedColumnName = "id")
    private ExamStaff examStaff; //考生id(考生表，examinee)

    @OneToOne(targetEntity = Paper.class, fetch = FetchType.LAZY)
    @JoinColumn(name = "paper_id", referencedColumnName = "id")
    private Paper paper; //试卷id(试题表)

    private double score;//试卷分数


    public ExamStaff getExamStaff() {
        return examStaff;
    }

    public void setExamStaff(ExamStaff examStaff) {
        this.examStaff = examStaff;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }
}
